package com.qf.yu.code.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qf.group.common.base.result.ResponseResult;
import com.qf.yu.code.entity.SysUser;
import com.qf.yu.code.service.SysUserService;
import com.qf.yu.code.service.impl.SysUserServiceImpl;
import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.constraints.Min;

/**
 * @Author Yu
 * @Date 2024/2/4 14:25
 **/
@RestController
@RequestMapping("/user")
@Api(tags = "测试")
@Validated
@Slf4j
public class sysUserController {
    @Resource
    private SysUserServiceImpl sysUserService;

    @GetMapping("/test")
    @ApiOperation("测试项目框架")
    @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "id")})
    @ApiResponses({@ApiResponse(code = 20000, message = "成功", response = SysUser.class), @ApiResponse(code = 40000, message = "未知错误")})
    public ResponseResult<SysUser> test(@RequestParam Integer id){
        return ResponseResult.success(sysUserService.test(id));
    }
}
